<%@ page language="java" contentType="text/html; charset=UTF-8"  pageEncoding="UTF-8"%>
<!DOCTYPE HTML>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>修改密码</title>
	<%@ include file="/view/common/tags.jsp"%>
</head>
  <body>
	<div class="pass_w_k">
		<form class="bs-example bs-example-form" method="post"  action="${sysManagerV1}/staff/passUpdate" id="ppost">
			<fieldset>
				<div class="form-group col-xs-12" >
					<label class="control-label col-sm-2 text-right " for="input-old-password">原始密码：</label>
					<div class="input-group col-xs-10 col-md-4">
						<input type="password" class="form-control" id="inputOldPassword" name="oldpassword" placeholder="请输入旧密码">
					</div>
				</div>
				<div class="form-group col-xs-12">
					<label class="control-label col-sm-2 text-right" for="input-password">修改密码：</label>
					<div class="input-group col-xs-10 col-md-4">
						<input type="password" class="form-control" id="inputPassword" name="password" placeholder="请输入新密码">
					</div>
				</div>
				<div class="form-group col-xs-12">
					<label class="control-label col-sm-2 text-right " for="input-repassword">重复密码：</label>
					<div class="input-group col-xs-10 col-md-4">
						<input type="password" class="form-control" id="inputRepassword" name="repassword"  placeholder="请输入新密码">
					</div>
				</div>
				<div class="form-group col-xs-12">
					<button type="button"  class="btn btn-info col-md-offset-2" onclick="password_post();" data-toggle="button">提交</button>
				</div>
			</fieldset>
		</form>
	</div>
   <%@ include file="/view/common/footer.jsp"%>
   <script type="text/javascript">
       $(function(){
           if("${code}" == 1) {
               layer.msg("${msg}");
           }
       });
    
       function password_post(){
           //layer.msg("密码不能为空！");
           var oldPassword = $('#inputOldPassword').val();
           var password = $('#inputPassword').val();
           var rePassword = $('#inputRepassword').val(); 
           if($.trim(oldPassword) == ''){
               layer.msg("原始密码不能为空！");
               return;
           }
           if($.trim(password) == ''){
               layer.msg("修改密码不能为空！");
               return;
           }
           if(password != rePassword){
               layer.msg("两次输入密码不一致！");
               return;
           }
           $('#ppost').submit(); 
       }
   </script>
  </body>
</html>
